import api from '../index'

export default {
  /**
   * 新增人员
   */
  create: (data: {
    name: string
  }) => api.post<number>('person', data),

  /**
   * 删除人员
   */
  delete: (id: number) => api.delete<number>(`person/${id}`),

  /**
   * 根据名字查询用户
   */
  findByName: (params:{name: string}) => api.get<PersonApiTypes>(`person`,{params}),
  //findByName: (name: string) => api.get<PersonApiTypes>(`person/${name}`),
  //只能传英文
}
